package org.happen.android.bean.request;

import java.util.ArrayList;
import java.util.List;

import org.happen.android.bean.BaseRequest;
import org.happen.android.bean.entity.KeyValue;
import org.happen.android.core.annotation.ReqParam;

public class PostRequest extends BaseRequest
{

	private static final long serialVersionUID = 1L;

	@ReqParam(asParam = false)
	private List<KeyValue> postParams;

	public List<KeyValue> getPostParams()
	{
		return postParams;
	}

	public BaseRequest addPostParam(KeyValue param)
	{
		if (postParams == null)
		{
			postParams = new ArrayList<KeyValue>();
		}
		postParams.add(param);
		return this;
	}

	public String toString()
	{
		return "PostRequest [postParams=" + postParams + ", reqId=" + reqId + ", url=" + url + "]";
	}
}